<?php echo $header;echo $sidebar ?>		

	<div class="span10 content">

		<?php echo $hugemenu ?>

		<h1><?php echo lang('invoice_page_title');?></h1>
		
		<?php if($success_message) { echo "<div class=\"alert alert-success\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $success_message . "</div>"; } ?>
		<?php if($message) { echo "<div class=\"alert alert-danger\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $message . "</div>"; } ?>

		<div>
			   	<?php $attrib = array('class' => 'form-horizontal'); echo form_open("admin/invoiceGeneralSetting");?>
				<div class="form-group">
				  <label for="currency_prefix"><?php echo $this->lang->line("invoice_currency_code"); ?></label>
				  <div class="controls"> <?php echo form_input('currency_prefix', $settings->currency_prefix, 'class="form-control" id="currency_prefix"');?>
				  </div>
				</div> 
				<div class="form-group">
				  <label for="major"><?php echo $this->lang->line("invoice_currency_major"); ?></label>
				  <div class="controls"> <?php echo form_input('major', $settings->major, 'class="form-control" id="major"');?>
				  </div>
				</div> 
				<div class="form-group">
				  <label for="minor"><?php echo $this->lang->line("invoice_currency_minor"); ?></label>
				  <div class="controls"> <?php echo form_input('minor', $settings->minor, 'class="form-control" id="minor"');?>
				  </div>
				</div> 
				<div class="form-group">
				  <label for="tax_rate"><?php echo $this->lang->line("invoice_tax_rate"); ?></label>
				  <div class="controls"> 
				  	<?php 
					  	foreach($tax_rates as $rate){
				    		$tr[$rate->id] = $rate->name;
						}
						echo form_dropdown('tax_rate', $tr, $settings->default_tax_rate, 'class="form-control" id"tax_rate"'); ?>
				  </div>
				</div> 
				<div class="form-group">
				  <label for="date_format"><?php echo $this->lang->line("invoice_default_date_format"); ?></label>
				  <div class="controls"> 
				  	<?php 
					  foreach($date_formats as $date_format){
							$dt[$date_format->id] = $date_format->js;
						}
						echo form_dropdown('date_format', $dt, $settings->dateformat, 'class="form-control tip chzn-select" data-placeholder="'.$this->lang->line("select").' '.$this->lang->line("date_format").'" required="required" data-error="'.$this->lang->line("date_format").' '.$this->lang->line("is_required").'"'); 
					?>
				  </div>
				</div>  
				
				<div class="form-group">
				  <div class="controls"> <?php echo form_submit('submit', $this->lang->line("invoice_update_settings"), 'class="btn btn-primary"');?> </div>
				</div>
				<?php echo form_close();?> 
		</div>
		
		
	</div><!--/content-->

<?php echo $footer ?>